class Part_purchaseFormModel extends Backbone.Model
    url: '/mytable/getModel?s=table.creators.Part_purchaseTable'
    initialize: (options) =>
        @fetch()
   
#--------------------------------------------------controler
class Part_purchasesApp
    search: =>
        myapp.mainRegion.close() 
        mymodel = new Part_purchaseFormModel
        @layout = new ModelMainLayout(model: mymodel)
        myapp.mainRegion.show(@layout)

            

#--------------------------------------------------router
class Part_purchasesAppRouter extends Backbone.Marionette.AppRouter
    appRoutes: 
        "part_purchases": "search"

                
myapp.addInitializer -> 
    myapp.Part_purchases_app = new Part_purchasesApp()
    myapp.Part_purchases_app.router = new Part_purchasesAppRouter controller: myapp.Part_purchases_app

myapp.vent.trigger("routing:started")
